﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ControlAccessUser.Presenter;

namespace ControlAccessUser.Presentation
{
    /// <summary>
    /// Lógica de interacción para RegisterUser.xaml
    /// </summary>
    /// 
    
    public partial class RegisterUser : Window, IUserRegisterView
    {
        PresenterUserRegister pUserRegister;
        public RegisterUser()
        {
            InitializeComponent();
            pUserRegister = new PresenterUserRegister(this);
        }

        public string UserFirstName
        {
            get{ return txbxUserFirstName.Text;}
        }

        public string UserLastName
        {
            get {return txbxUserLastName.Text;}
        }

        public string UserName
        {
            get
            {
                return txbxUserName.Text;
            }            
        }

        public string UserPassword
        {
            get
            {
                return txbxUserPassword.Password;
            }
        }

        public string SystemMessage
        {
            set
            {
                lblMessage.Content=value;
            }

        }
        public string ErrorMessage
        {
            set { lblMessage.Content = value; }
        }

        private void btnUserRegister_Click(object sender, RoutedEventArgs e)
        {
            pUserRegister.RegisterUser();
        }

        private void btnCancelUserRegister_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
